from django.urls import re_path
from django.views.generic import TemplateView
from . import views

# app_name = 'jobs'
urlpatterns = [
    re_path(r"^history$", views.history_index, name="history_index"),
    re_path(r"^history/detail/(?P<id>\d+)$", views.history_detail, name="history_detail"),
    re_path(r"^history/detail_add_note/(?P<id>\d+)$", views.history_detail_add_note, name="history_detail_add_note"),
    re_path(r"^api/predict$", views.predict, name="predict"),
    re_path(r"^api/get-diagnosis-history$", views.get_diagnosis_history, name="get_diagnosis_history"), # 链接是用`-`连接
    re_path(
        r"^upload$", views.upload_audio, name="upload_audio"
    ),  # 若是post请求，调用upload_audio函数,否则get 展现表单
    # re_path(r'^disease/(?P<type>.*)$', views.show_disease, name='disease')
    # re_path(r"^disease$", views.show_disease, name="disease"),
    re_path( # todo 可视化大屏应该单独分出一个app，而不是和诊断识别一起
        r"^dashborad$",
        TemplateView.as_view(template_name="disease_recognition/dashborad.html"),
        name="dashborad",
    ),
]
